using FluentNHibernate.Mapping;
using TimeKeeper.Entities;

namespace TimeKeeper.Mappings
{
    public sealed class ProjectMap : ClassMap<Project>
    {
        public ProjectMap()
        {
            Id(p => p.Id);
            Map(p => p.Name);
            Map(p => p.Description);
            HasMany(x => x.TimeOnProject).Cascade.DeleteOrphan().Inverse().AsBag();
        }
    }
}